-
Notifications
You must be signed in to change notification settings - Fork 13.7k
Stabilize s390x vector
target feature and is_s390x_feature_detected!
macro
#145656
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Conversation
cc @Amanieu, @folkertdev, @sayantn |
@rfcbot merge |
Team member @Amanieu has proposed to merge this. The next step is review by the rest of the tagged team members:
No concerns currently listed. Once a majority of reviewers approve (and at most 2 approvals are outstanding), this will enter its final comment period. If you spot a major issue that hasn't been raised at any point in this process, please speak up! cc @rust-lang/lang-advisors: FCP proposed for lang, please feel free to register concerns. |
I think this is fine since we don't have a soft-float s390x target and don't expose the |
|
On s390x, in LLVM (and GCC), the In LLVM in particular, the back-end does actually implement that In practice, the only user of |
We've revised and approved the Reference PR, so this will be good to go on that front when FCP completes. (cc @rust-lang/lang-docs) On the lang side, this looks good to me. @rfcbot reviewed |
closes #145649
closes #135413
cc: #130869
reference PR: rust-lang/reference#1972
Stabilization report
Summary
This PR stabilizes the following s390x target features:
vector
vector-enhancements-1
vector-enhancements-2
vector-enhancements-3
vector-packed-decimal
vector-packed-decimal-enhancement
vector-packed-decimal-enhancement-2
vector-packed-decimal-enhancement-3
nnp-assist
miscellaneous-extensions-2
miscellaneous-extensions-3
miscellaneous-extensions-4
Additionally, it stabilizes the
core::arch::is_s390x_feature_detected!
macro itself and stably accepts the target features listed above.Tests & ABI details
Only the
vector
target feature changes the ABI, much like e.g.avx2
it will, depending on the ABI, pass vector types in vector registers. This behavior is tested extensively:The remaining features don't influence the ABI, they only influence instruction selection. In stdarch we test that the expected instructions are in fact generated when the target feature is enabled.
Implementation history
For
is_s390x_feature_detected!
:is_s390x_feature_detected
stdarch#1699is_s390x_feature_detected!
fromstd::arch
#138275s390x_is_feature_detected!
: detect more features stdarch#1720For
vector
and friendss390x
target features #135630Unresolved questions
There is a fixme in tests/ui/abi/simd-abi-checks-s390x.rs:
I'm not sure whether that blocks stabilization?
The implementation first extracts the listed target features into their own
s390x_target_feature_vector
rust feature, and then stabilizes that. best reviewed commit-by-commitr? @Amanieu
cc @uweigand @taiki-e